import React from "react";
import routes from "./routes";
import { BrowserRouter, Routes, Route } from "react-router-dom";
const Router = () => {
  return (
    <BrowserRouter>
      <React.Suspense>
        <Routes>
          {routes.map((v, i) => {
            return <Route key={i} path={v.path} element={v.element}></Route>;
          })}
        </Routes>
      </React.Suspense>
    </BrowserRouter>
  );
};

export default Router;
